﻿<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    <script src="~/Scripts/jquery-1.7.1.min.js"></script>
    <link href="@Url.Content("~/Content/PokerLife.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/Content/kendo/kendo.common.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/kendo.default.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/kendo.dataviz.default.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/Ext/kendo.ext.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/MySkin.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/stype.css")" rel="stylesheet" type="text/css" />


    <script src="@Url.Content("~/Scripts/kendo/jquery.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/kendo.all.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/kendo.aspnetmvc.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/kendo.web.ext.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.cookie.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.formatCurrency-1.4.0.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.formatCurrency-1.4.0.js")"></script>

    @*@Styles.Render("~/Content/css")
    @Styles.Render("~/Content/kendo/css")
    @Scripts.Render("~/bundles/modernizr")
    @Scripts.Render("~/bundles/jquery")*@

</head>
<body style="margin-left:10px;margin-right:10px;">
    <div id="TopAdmin">
        <div style="float: left; width: 100%; height: 80px">
            <h1>Admin</h1>
        </div>

        <div style="clear: both; float: left; width: 100%">
            @(Html.Kendo().Menu()
            .Name("MenuAdmin")
            .Items(items =>
                {
                    items.Add()
                        .Text("System")
                        .Items(children =>
                            {
                                children.Add().Text("User")
                                .Url(@Url.Content("~/User"));
                            })
                        .Items(children =>
                            {
                                children.Add().Text("MemberType")
                                .Url(@Url.Content("~/MemberType"));
                            })
                        .Items(children =>
                            {
                                children.Add().Text("Member")
                                .Url(@Url.Content("~/Member"));
                            });
                    
                    items.Add()
                       .Text("List")
                       .Items(children =>
                       {
                           children.Add().Text("Country")
                           .Url(@Url.Content("~/Country"));
                       })
                       .Items(children =>
                       {
                           children.Add().Text("Province")
                           .Url(@Url.Content("~/Province"));
                       })
                    .Items(children =>
                       {
                           children.Add().Text("Currency")
                           .Url(@Url.Content("~/Currency"));
                       });
                    items.Add()
                        .Text("Tournament")
                        .Items(children =>
                        {
                            children.Add().Text("Tournament")
                            .Url(@Url.Content("~/Tournament"));
                        });
                })
        )

        </div>
    </div>

    <div id="MainContent">
        @RenderBody()
    </div>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/kendo")
</body>
</html>

<script>
    function resizeGrid() {
        $('#Grid').height($('#MainContent').height() - 2);
        var gridElement = $("#Grid"),
            dataArea = gridElement.find(".k-grid-content"),
            gridHeight = gridElement.innerHeight(),
            otherElements = gridElement.children().not(".k-grid-content"),
            otherElementsHeight = 0;

        otherElements.each(function () {
            otherElementsHeight += $(this).outerHeight();
        });

        dataArea.height(gridHeight - otherElementsHeight);
    }
    function setSize() {
        var height = ($(window).height() - ($('#TopAdmin').outerHeight()));
        $('#MainContent').css('height', (height) + 'px');
        //$('#MenuContent').css('height', (height) + 'px');
        resizeGrid();
    }

    setSize();
    $(document).ready(function () {
        setSize();
    });
</script>

<style>
    #TopAdmin {
        float: left; 
        width: 100%; 
        background-color: ActiveBorder
    }
</style>